// pages/my_talent/my_talent.js
const app=getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    Ulevel:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
      this.getLevel();
  },

  getLevel:function() {
    const that = this;
      wx.request({
        url: `${app.globalData.url}/users/my-home/my-talent`,
        header: { 
          'Content-Type': 'application/json'
        },
        data: {
          Uid:wx.getStorageSync('Uid')
        },
        success:function(res) {
          console.log(res.data[0].Ulevel)
          that.setData({
            Ulevel:res.data[0].Ulevel
          })
        }
      })
  }
})